Class CollectionValueBase<T>

Base class for classes implementing ICollectionValue[T]

Implements

IEnumerable<T>, System.Collections.IEnumerable, System.IFormattable, ICollectionValue<T>, IShowable

Bases

object, EnumerableBase<T>

Base of

ArrayBase<T>, ArrayBase<T>.Range, ArrayList<T>, CircularQueue<T>, CollectionBase<T>, DictionaryBase<K,V>, DirectedCollectionBase<T>, DirectedCollectionValueBase<T>, HashBag<T>, HashDictionary<K,V>, HashedArrayList<T>, HashedLinkedList<T>, HashSet<T>, IntervalHeap<T>, LinkedList<T>, SequencedBase<T>, SortedArray<T>, SortedDictionaryBase<K,V>, TreeBag<T>, TreeDictionary<K,V>, TreeSet<T>

Event overview

CollectionChanged ,
CollectionCleared ,
ItemInserted ,
ItemRemovedAt ,
ItemsAdded ,
ItemsRemoved

Property overview

ActiveEvents ,
Count ,
CountSpeed ,
IsEmpty ,
ListenableEvents

Constructor overview

CollectionValueBase<T>()

Method overview

All(Fun<T,bool> predicate) ,
Apply(Act<T> action) ,
Choose() ,
CopyTo(T[] array, int index) ,
Equals(object obj), Inherited from object ,
Exists(Fun<T,bool> predicate) ,
Filter(Fun<T,bool> predicate) ,
Finalize(), Inherited from object ,
Find(Fun<T,bool> predicate, out T item) ,
GetEnumerator() ,
GetHashCode(), Inherited from object ,
GetType(), Inherited from object ,
MemberwiseClone(), Inherited from object ,
raiseCollectionChanged() ,
raiseCollectionCleared(bool full, int count) ,
raiseCollectionCleared(bool full, int count, System.Nullable<int> offset) ,
raiseForAdd(T item) ,
raiseForInsert(int i, T item) ,
raiseForRemove(T item) ,
raiseForRemove(T item, int count) ,
raiseForRemoveAll(ICollectionValue<T> wasRemoved) ,
raiseForRemoveAt(int index, T item) ,
raiseForSetThis(int index, T value, T item) ,
raiseForUpdate(T newitem, T olditem) ,
raiseForUpdate(T newitem, T olditem, int count) ,
raiseItemInserted(T item, int index) ,
raiseItemRemovedAt(T item, int index) ,
raiseItemsAdded(T item, int count) ,
raiseItemsRemoved(T item, int count) ,
Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider) ,
ToArray() ,
ToString(string format, System.IFormatProvider formatProvider) ,
ToString()

Event details

CollectionChangedHandler<T> CollectionChanged The change event. Will be raised for every change operation on the collection.
CollectionClearedHandler<T> CollectionCleared The clear event. Will be raised for every Clear operation on the collection.
ItemInsertedHandler<T> ItemInserted The item added event. Will be raised for every individual addition to the collection.
ItemRemovedAtHandler<T> ItemRemovedAt The item removed event. Will be raised for every individual removal from the collection.
ItemsAddedHandler<T> ItemsAdded The item added event. Will be raised for every individual addition to the collection.
ItemsRemovedHandler<T> ItemsRemoved The item removed event. Will be raised for every individual removal from the collection.

Property details

EventTypeEnum ActiveEventsAccess: Read-Only

Value:

A flag bitmap of the events currently subscribed to by this collection.
A int CountAccess: Read-Only

Value:

The number of items in this collection.
A Speed CountSpeedAccess: Read-Only

Value:A characterization of the speed of the Count property in this collection.

The value is symbolic indicating the type of asymptotic complexity in terms of the size of this collection (worst-case or amortized as relevant).
A bool IsEmptyAccess: Read-Only

Value:True if empty

Check if collection is empty.
EventTypeEnum ListenableEventsAccess: Read-Only

Value:

Constructor details

PCollectionValueBase<T>()

Method details

bool All(Fun<T,bool> predicate) Check if all items in this collection satisfies a specific predicate.
Returns:True if all items satisfies the predicate
Parameters:
predicate:A delegate (Fun<A1,R> with R = bool) defining the predicate
void Apply(Act<T> action) Apply an single argument action, Act<A1> to this enumerable
Parameters:
action:The action delegate
A T Choose() Choose some item of this collection.
Throws
NoSuchItemExceptionif collection is empty.
Returns:
void CopyTo(T[] array, int index) Copy the items of this collection to part of an array.
Throws
System.ArgumentOutOfRangeException if index is not a valid index into the array (i.e. negative or not less than the size of the array) or the array does not have room for the items.
Parameters:
array:The array to copy to.
index:The starting index.
bool Exists(Fun<T,bool> predicate) Check if there exists an item that satisfies a specific predicate in this collection.
Returns:True if such an item exists
Parameters:
predicate:A delegate (Fun<A1,R> with R = bool) defining the predicate
IEnumerable<T> Filter(Fun<T,bool> predicate) Create an enumerable, enumerating the items of this collection that satisfies a certain condition.
Returns:The filtered enumerable
Parameters:
predicate:A delegate (Fun<A1,R> with R = bool) defining the predicate
bool Find(Fun<T,bool> predicate, out T item) Check if there exists an item that satisfies a specific predicate in this collection and return the first one in enumeration order.
Returns:True is such an item exists
Parameters:
predicate:A delegate (Fun<A1,R> with R == bool) defining the predicate
item:
A System.Collections.Generic.IEnumerator<T> GetEnumerator() Create an enumerator for this collection.
Returns:The enumerator
P void raiseCollectionChanged() Fire the CollectionChanged event
P void raiseCollectionCleared(bool full, int count) Fire the CollectionCleared event
P void raiseCollectionCleared(bool full, int count, System.Nullable<int> offset) Fire the CollectionCleared event
P void raiseForAdd(T item)
Parameters:
item:
P void raiseForInsert(int i, T item)
Parameters:
i:
item:
NP void raiseForRemove(T item)
Parameters:
item:
NP void raiseForRemove(T item, int count)
Parameters:
item:
count:
P void raiseForRemoveAll(ICollectionValue<T> wasRemoved)
Parameters:
wasRemoved:
NP void raiseForRemoveAt(int index, T item)
Parameters:
index:
item:
P void raiseForSetThis(int index, T value, T item)
Parameters:
index:
value:
item:
P void raiseForUpdate(T newitem, T olditem)
Parameters:
newitem:
olditem:
P void raiseForUpdate(T newitem, T olditem, int count)
Parameters:
newitem:
olditem:
count:
P void raiseItemInserted(T item, int index) Fire the ItemInserted event
Parameters:
item:The item that was added
index:
P void raiseItemRemovedAt(T item, int index) Fire the ItemRemovedAt event
Parameters:
item:The item that was removed
index:
P void raiseItemsAdded(T item, int count) Fire the ItemsAdded event
Parameters:
item:The item that was added
count:
P void raiseItemsRemoved(T item, int count) Fire the ItemsRemoved event
Parameters:
item:The item that was removed
count:
bool Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider)
Returns:
Parameters:
stringbuilder:
rest:
formatProvider:
T[] ToArray() Create an array with the items of this collection (in the same order as an enumerator would output them).
Returns:The array
string ToString(string format, System.IFormatProvider formatProvider)
Returns:
Parameters:
format:
formatProvider:
string ToString()
Returns: